package com.huluobo.a2302mdmdemo.demo

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.navigation.NavHostController
import com.blankj.utilcode.util.SPUtils
import com.google.gson.Gson

/**
 *  Created by LC on 2025/7/21.
 */
@Composable
fun SecPage(navHostController: NavHostController, str: String) {
    val sp = SPUtils.getInstance().getString("user")
    val user = Gson().fromJson(sp, User::class.java)
    Text(text = "第二页面$user", modifier = Modifier
        .fillMaxSize()
        .background(Color.Green)
        .clickable {
            //返回
            navHostController.popBackStack()
        })
}